In current network technologies, in the case of mobile communication, an IP address assigned by an operator to a mobile terminal is an IP address of the operator's intranet because IPv4 has a finite number of IP addresses. When the mobile terminal requires networking resources, Network Address Translation (NAT) is performed through a gateway of the operator, so as to implement network communication of the mobile terminal. To be able to ensure effective application of the IP address of the intranet, gateways of most mobile network operators at present may eliminate corresponding entries in a NAT table in a period of time when there is no data communication on a communication link, causing interruption of the communication link, and the mobile terminal may not perceive that the communication link is interrupted. This is commonly referred to as NAT aging. To be able to keep alive a connection between the mobile terminal and a background server, a client needs to send an application-layer-defined protocol packet to the server, called a heartbeat or heartbeat packet. Intelligent heartbeat means dynamically adjusting the frequency of the heartbeat according to the type of network and the stability of the network to keeping a network link alive for as long as possible, dynamically decrease the frequency of the heartbeat, and reduce consumption of network resources.
As an example of current intelligent heartbeat keep-alive technologies, Google Cloud Message (GCM) keeps alive network links by distinguishing network types and respectively using different heartbeats at a fixed interval with respect to the different types of networks. For example, a 15-minute heartbeat interval is used in the case of Wi-Fi, and a 28-minute heartbeat interval is used in the case of a data network. Other mobile terminal applications all also use a fixed heartbeat strategy, and typical heartbeat values include 3 minutes and 20 seconds, 4 minutes and 30 seconds, 4 minutes and 45 seconds, 7 minutes, 15 minutes, 28 minutes, and so on.